package com.hfb.mashibing.alip8.spring.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

//@DependsOn({"propertySourcesPlaceholderConfigurer"})
// 后面会在配置类中使用@EnableConfigurationProperties注解，不需要将该属性类上添加@Component注解
@ConfigurationProperties(prefix = "all")
@PropertySource(value = "classpath:application.yml", encoding = "UTF-8")
@Component
@Configuration
@Data
public class Person1 {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
